package com.ruoqing.core.domain.rqblog;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

  /**  
    * @title: BlogIntroducePo
    * @projectName ruoxi-blog
    * @description: 若兮微服务 - 博客服务 - 博客简介持久化对象
    * @author YaoXian
    * @date 2021-01-20 11:56
    */
@Data
@TableName(value = "ruoqing_blog_brief")
public class BlogIntroducePo {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "top")
    private Boolean isTop;

    @TableField(value = "banner")
    private String banner;

    @TableField(value = "hot")
    private Boolean isHot;
    
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value = "publish_time")
    private Date publishTime;

    @TableField(value = "title")
    private String title;

    @TableField(value = "summary")
    private String summary;

    @TableField(value = "views_count")
    private Integer viewsCount;

    @TableField(value = "comments_count")
    private Integer commentsCount;

    @TableField(value = "author")
    private String author;

    @TableField(value = "sort")
    private String sort;
    
    @TableField(value = "details_id")
    private Integer detailsId;
    

    public static final String COL_ID = "id";

    public static final String COL_TOP = "top";

    public static final String COL_BANNER = "banner";

    public static final String COL_HOT = "hot";

    public static final String COL_PUBLISH_TIME = "publish_time";

    public static final String COL_TITLE = "title";

    public static final String COL_SUMMARY = "summary";

    public static final String COL_VIEWS_COUNT = "views_count";

    public static final String COL_COMMENTS_COUNT = "comments_count";

    public static final String COL_AUTHOR = "author";

    public static final String COL_SORT = "sort";
}